<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>淘宝</title>
    <link rel="stylesheet" href="../css/shouye.css">
    <script src="../js/jquery.min.js"></script>
    <script src="../js/shouye.js"></script>
    <script src="../js/startMove.js"></script>
    <script src="../js/axios.js"></script>
    <link rel="shortcut icon" href="../img/1.ico" />
    <!-- <script src="../js/shouyelunbo.js"></script> -->
    <!-- <link rel="stylesheet" href="../css/shouyelunbo.css"> -->
    <link rel="stylesheet" href="../font/iconfont.css">
</head>

<body>
    <!-- 导航 -->
    <div class="Bigbox">
        <div class="box">
            <ul class="nav">
                <li>
                    <a href="#" id="a1"><span id="a3">马来西亚</span><i class="iconfont icon-xiala"></i></a>
                    <ul>
                        <li>
                            <a href="">全球</a>
                        </li>
                        <li>
                            <a href="">中国大陆</a>
                        </li>
                        <li>
                            <a href="">中国香港</a>
                        </li>
                        <li>
                            <a href="">中国澳门</a>
                        </li>
                        <li>
                            <a href="">中国台湾</a>
                        </li>
                        <li>
                            <a href="">新家坡</a>
                        </li>
                        <li>
                            <a href="">韩国</a>
                        </li>
                        <li>
                            <a href="">马来西亚</a>
                        </li>
                        <li>
                            <a href="">澳大利亚</a>
                        </li>
                        <li>
                            <a href="">新西兰</a>
                        </li>
                        <li>
                            <a href="">加拿大</a>
                        </li>
                        <li>
                            <a href="">日本</a>
                        </li>
                        <li>
                            <a href="">越南</a>
                        </li>
                        <li>
                            <a href="">泰国</a>
                        </li>
                        <li>
                            <a href="">菲律宾</a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="denglu.html" target="_blank">亲，请登录</a>
                </li>
                <li>
                    <a href="zhuce.html" target="_blank">免费注册</a>
                </li>
                <li>
                    <a href="#">手机逛淘宝</a>
                </li>
                <li>
                    <a href="#">网页无障碍</a>
                </li>
            </ul>

            <ul class="nav" id="nav">
                <li>
                    <a href="#" id="a1">我的淘宝
                        <i class="iconfont icon-xiala"></i>
                    </a>
                    <ul id="Ul">
                        <li>
                            <a href="">已买到的宝贝</a>
                        </li>
                        <li>
                            <a href="">我的足迹</a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#"><span class="iconfont icon-gouwuche-tianchong"></span>购物车</a>
                </li>
                <li>
                    <a href="#" id="a2"><span class="iconfont icon-shoucang"></span>收藏夹<i
                            class="iconfont icon-xiala"></i></a>
                    <ul id="Ul">
                        <li>
                            <a href="">收藏的宝贝</a>
                        </li>
                        <li>
                            <a href="">收藏的店铺</a>
                        </li>
                    </ul>

                </li>
                <li>
                    <a href="#
                    " id="a4">商品分类</a>
                </li>
                <li>
                    <a href="#" id="a5">免费开店</a>
                </li>
                <i id="i">|</i>
                <li id="a1-1">
                    <a href="" id="a1">千牛买卖家中心<i class="iconfont icon-xiala"></i></a>
                    <ul id="Ul1">
                        <li>
                            <a href="">开店入驻</a>
                        </li>
                        <li>
                            <a href="">已卖出的宝贝</a>
                        </li>
                        <li>
                            <a href="">出售中的宝贝</a>
                        </li>
                        <li>
                            <a href="">卖家服务市场</a>
                        </li>
                        <li>
                            <a href="">卖家培训中心</a>
                        </li>
                        <li>
                            <a href="">体验中心</a>
                        </li>
                        <li>
                            <a href="">电商学习中心</a>
                        </li>
                    </ul>
                </li>
                <li id="a1-2">
                    <a href="" id="a1">联系客服<i class="iconfont icon-xiala"></i></a>
                    <ul id="Ul">
                        <li>
                            <a href="">消费者客服</a>
                        </li>
                        <li>
                            <a href="">卖家客服</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!-- 中间 -->
    <div class="box box-img">
        <div><a href="denglu.html"><img src="../img/taobao1.png" alt=""></a></div>
        <div>
            <ul class="nav nav1">
                <li>
                    <a href=""><span>宝贝</span>
                        <i class="iconfont icon-xiala"></i>
                    </a>
                    <ul id="Ul2">
                        <li>
                            <a href="">天猫</a>
                        </li>
                        <li>
                            <a href="">店铺</a>
                        </li>
                    </ul>
                </li>
            </ul>
            <!-- BUG搜索 -->
            <!--  <span class="iconfont icon-sousuo"></span> -->
            <ul id="Ul3">
                <a href="">
                    <li>新连衣裙</li>
                </a>
                <a href="">
                    <li>四件套</li>
                </a>
                <a href="">
                    <li>潮流T恤</li>
                </a>
                <a href="">
                    <li>时尚女靴</li>
                </a>
                <a href="">
                    <li>短裤</li>
                </a>
                <a href="">
                    <li>半身裙</li>
                </a>
                <a href="">
                    <li>男士外套</li>
                </a>
                <a href="">
                    <li>行车记录仪</li>
                </a>
                <a href="">
                    <li>墙纸</li>
                </a>
                <a href="">
                    <li>新款男靴</li>
                </a>
                <a href="">
                    <li>耳机</li>
                </a>
            </ul>
            <input type="text" id="put" placeholder="行李箱">
            <button>搜索</button>
        </div>
        <div>
            <a href="">
                <p>下载淘宝</p>
                <a href="https://market.m.taobao.com/app/fdilab/download-page/main/index.html?spm=3047c.jianhua.201858.1.5af911d9qvZ9ae"
                    target="_blank">
                    <p><img src="../img/er1.png" alt=""></p>
                </a>
            </a>
        </div>
    </div>

    <!-- 主题市场 -->
    <div class="box box-z">
        <div class="z-one">
            <h2>主题市场</h2>
            <ul>
                <a href="">
                    <li>天猫</li>
                </a>
                <a href="">
                    <li>聚划算</li>
                </a>
                <a href="">
                    <li>天猫超市</li>
                </a>
                <a href="">
                    <li>司法拍卖</li>
                </a>
                <a href="">
                    <li>飞猪旅行</li>
                </a>
                <a href="">
                    <li>天天特卖</li>
                </a>
                <a href="">
                    <li>造点新货</li>
                </a>
                <a href="">
                    <li>苏宁易购</li>
                </a>
                <a href="">
                    <li>淘宝心选</li>
                </a>
                <a href="">
                    <li>智能生活</li>
                </a>
                <a href="">
                    <li>淘宝直播</li>
                </a>
            </ul>
        </div>
    </div>

    <!-- 列表加轮播 -->
    <div class="box box-lb">
        <div class="box-l">
            <ul>
                <li>
                    <span class="iconfont icon-nvzhuang"></span>
                    <a href="">女装</a>
                    <s>/</s>
                    <a href="">内衣</a>
                    <s>/</s>
                    <a href="">家居</a>
                </li>

                <li>
                    <span class="iconfont icon-shengxian_yazi"></span>
                    <a href="">女鞋</a>
                    <s>/</s>
                    <a href="">男鞋</a>
                    <s>/</s>
                    <a href="">箱包</a>
                </li>

                <li>
                    <span class="iconfont icon-gouwudai301"></span>
                    <a href="">母婴</a>
                    <s>/</s>
                    <a href="">童装</a>
                    <s>/</s>
                    <a href="">玩具</a>
                </li>

                <li>
                    <span class="iconfont icon-nanzhuang"></span>
                    <a href="">男装</a>
                    <s>/</s>
                    <a href="">运动户外</a>
                </li>

                <li>
                    <span class="iconfont icon-meizhuanghufu"></span>
                    <a href="">美妆</a>
                    <s>/</s>
                    <a href="">彩妆</a>
                    <s>/</s>
                    <a href="">个护</a>
                </li>

                <li>
                    <span class="iconfont icon-shouji"></span>
                    <a href="">手机</a>
                    <s>/</s>
                    <a href="">数码</a>
                    <s>/</s>
                    <a href="">企业</a>
                </li>

                <li>
                    <span class="iconfont icon-lingshi"></span>
                    <a href="">大家电</a>
                    <s>/</s>
                    <a href="">生活电器</a>
                </li>

                <li>
                    <span class="iconfont icon-dianpu"></span>
                    <a href="">零食</a>
                    <s>/</s>
                    <a href="">生鲜</a>
                    <s>/</s>
                    <a href="">茶酒</a>
                </li>

                <li>
                    <span class="iconfont icon-chufang"></span>
                    <a href="">厨具</a>
                    <s>/</s>
                    <a href="">收纳</a>
                    <s>/</s>
                    <a href="">清洁</a>
                </li>

                <li>
                    <span class="iconfont icon-jiajujiafang"></span>
                    <a href="">家纺</a>
                    <s>/</s>
                    <a href="">家饰</a>
                    <s>/</s>
                    <a href="">鲜花</a>
                </li>

                <li>
                    <span class="iconfont icon-tushu"></span>
                    <a href="">图书音像</a>
                    <s>/</s>
                    <a href="">文具</a>
                </li>

                <li>
                    <span class="iconfont icon-yiyaoxiang"></span>
                    <a href="">医药保健</a>
                    <s>/</s>
                    <a href="">进口</a>
                </li>

                <li>
                    <span class="iconfont icon-qiche"></span>
                    <a href="">汽车</a>
                    <s>/</s>
                    <a href="">二手车</a>
                    <s>/</s>
                    <a href="">用品</a>
                </li>

                <li>
                    <span class="iconfont icon-jiajujiafang"></span>
                    <a href="">房产</a>
                    <s>/</s>
                    <a href="">装修家具</a>
                    <s>/</s>
                    <a href="">建材</a>
                </li>

                <li>
                    <span class="iconfont icon-shoubiao"></span>
                    <a href="">手表</a>
                    <s>/</s>
                    <a href="">眼镜</a>
                    <s>/</s>
                    <a href="">珠宝饰品</a>
                </li>
            </ul>
        </div>
        <!-- 轮播 -->
        <div class="box-b">
            <div class="sliderBox" id="sliderBox1">
                <ul class="sliderUl">
                    <li><img src="../img/chao.jpg" alt=""></li>
                    <li><img src="../img/hui.jpg" alt=""></li>
                    <li><img src="../img/fang.jpg" alt=""></li>
                    <li><img src="../img/te.jpg" alt=""></li>
                    <li><img src="../img/xie.jpg" alt=""></li>
                    <li><img src="../img/chao.jpg" alt=""></li>
                </ul>
                <!-- 加上箭头 -->
                <div class="btns">
                    <!-- 左箭头 -->
                    <span>&lt;</span>
                    <!-- 右箭头 -->
                    <span>&gt;</span>n
                </div>
                <!-- 加上圆点 -->
                <ul class="circles">
                    <li class="hover"><span></span></li>
                    <li><span></span></li>
                    <li><span></span></li>
                    <li><span></span></li>
                    <li><span></span></li>
                </ul>

            </div>
            <div class="tm">
                <img src="../img/TM.png" alt="">
                <span>理想生活上天猫</span>
                <!-- 广告 -->
                <a href=""><span>广告</span></a>
            </div>

            <!-- 下边轮播 -->
            <div class="sliderBox1" id="sliderBox2">
                <ul class="sliderUl1">
                    <li>
                        <img src="../img/a10.jpg " alt=" " />
                        <img src="../img/a6.jpg " alt=" " />
                    </li>

                    <li>
                        <img src="../img/a2.jpg " alt=" " />
                        <img src="../img/a8.jpg " alt=" " />
                    <li>
                        <img class="jianju" src="../img/a1.jpg " alt=" " />
                        <img src="../img/a7.jpg " alt=" " />
                    </li>

                    <li>
                        <img src="../img/a3.jpg " alt=" " />
                        <img src="../img/a5.jpg " alt=" " />
                    </li>

                    <li>
                        <img src="../img/a9.jpg " alt=" " />
                        <img src="../img/a4.jpg " alt=" " />
                    </li>

                    <li>
                        <img src="../img/a10.jpg " alt=" " />
                        <img src="../img/a6.jpg " alt=" " />
                    </li>
                </ul>
                <!-- 加上箭头 -->
                <div class="btns1">
                    <!-- 左箭头 -->
                    <span>&lt;</span>
                    <!-- 右箭头 -->
                    <span>&gt;</span>
                </div>
            </div>
        </div>
        <!-- 右边 -->
        <div class="tao">
            <div>
                <p>
                    <a href=""><img src="../img/HI.jpg" alt=""></a>
                    <span>Hi! 你好</span>
                </p>
                <div class="ton">
                    <a href="./denglu.html" target="_blank"><button> 登录 </button></a>
                    <a href="./zhuce.html" target="_blank"><button> 注册 </button></a>
                    <a href="https://ishop.taobao.com/openshop/tb_open_shop_landing.htm?spm=2440x.jianhua.201864-2.3.5af911d9lDfP52&accessCode=tbopenshop_personal"
                        target="_blank"><button> 开店 </button></a>
                </div>
            </div>
            <div>
                <img src="../img/fenxiang.png" alt="">
            </div>
            <div>
                <p>
                    <span>公告</span>
                    <span>新鲜事儿都在这~</span>
                </p>
                <p>
                    <a href=""> <span class="sp">规则</span></a>
                    <a href=""><span class="sp1">奥运知识产权规则解读</span></a>
                </p>
                <p>
                    <a href=""> <span class="sp">热点</span></a>
                    <a href=""><span class="sp1">关于推进“晴朗”账号乱象专项整治的通知</span></a>
                </p>
                <p>
                    <a href=""> <span class="sp">热点</span></a>
                    <a href=""><span class="sp1">淘宝平台打击流量造假、黑公关、网络水军公告</span></a>
                </p>
            </div>
            <div>
                <p>
                    <a href=""><span class="iconfont icon-shoucang1"></span>
                        <span>收藏的宝贝</span></a>
                </p>
                <p>
                    <a href=""><span class="iconfont icon-gouwudai301"></span>
                        <span>买过的店铺</span></a>
                </p>
                <p>
                    <a href=""><span class="iconfont icon-dianpu"></span>
                        <span>收藏的店铺</span></a>
                </p>
                <p>
                    <a href=""><span class="iconfont icon-lishi"></span>
                        <span>我的足迹</span></a>
                </p>
            </div>
        </div>
    </div>

    <!-- 有好货 -->
    <div class="box box-you">
        <div class="box-o">
            <h2>有好货</h2>
            <img src="../img/liwai.png" alt="">
        </div>

        <div id="send">
            <input type="text" name="" id="" placeholder="商品名" />
            <input type="text" name="" id="" placeholder="商品价格" />
            <input type="text" name="" id="" placeholder="商品详情" />
            <input type="text" name="" id="" placeholder="商品的图片地址" />

            <br />
            <button>发布商品</button>
        </div>

        <!-- <div id="updateDiv" style="display: none">
            <input type="text" name="" id="" placeholder="商品名" />
            <input type="text" name="" id="" placeholder="商品价格" />
            <input type="text" name="" id="" placeholder="商品详情" />
            <input type="text" name="" id="" placeholder="商品的图片地址" />
            <br />

            <button>保存商品</button>
        </div> -->

        <ul id="plist">
            <!-- <li>
            <h2></h2>
            <img src="" alt="">
            <p></p>
        </li> -->
        </ul>

        <div class="box-o" id="n">
            <h2>猜你喜欢</h2>
            <img src="../img/annm.png" alt="">
        </div>
    </div>
    <div class="box end">
        <h2>END</h2>
        <div>
            <ul>
                <li>
                    <span class="iconfont icon-xiaofeizhebaozhang"></span>
                    消费者保障
                    <p id="bos-e">保障范围&nbsp;&nbsp; 退货退款流程</p>
                    <p>服务中心&nbsp;&nbsp; 更多特色服务</p>
                </li>
                <li>
                    <span class="iconfont icon-xinshoushanglu"></span>
                    新手上路
                    <p id="bos-e">新手专区&nbsp;&nbsp; 消费警示 &nbsp;&nbsp;交易安全</p>
                    <p>24小时在线帮助&nbsp;&nbsp; 免费开店</p>
                </li>
                <li>
                    <span id="iconfont icon-fukuanfangshi"></span>
                    付款方式
                    <p id="bos-e">快捷支付&nbsp;&nbsp; 信用卡&nbsp;&nbsp; 余额宝</p>
                    <p>蚂蚁花呗 &nbsp;&nbsp; 货到付款</p>
                </li>
                <li>
                    <span class="iconfont icon-taobaotese"></span>
                    淘宝特色
                    <p id="bos-e">手机淘宝&nbsp;&nbsp; 旺旺/旺信&nbsp;&nbsp; 大众评审</p>
                    <p></p>
                </li>
            </ul>
        </div>
    </div>
    <!-- 下面 -->
    <div class="footer ">
        <div class="footer-hd box">
            <p>
                <a href="">阿里巴巴集团</a>
                <b>|</b>
                <a href="">阿里巴巴国际站</a>
                <b>|</b>
                <a href="">阿里巴巴中国站</a>
                <b>|</b>
                <a href="">全球速卖通</a>
                <b>|</b>
                <a href="">淘宝网</a>
                <b>|</b>
                <a href="">天猫</a>
                <b>|</b>
                <a href="">聚划算</a>
                <b>|</b>
                <a href="">一淘</a>
                <b>|</b>
                <a href="">阿里妈妈</a>
                <b>|</b>
                <a href="">飞猪</a>
                <b>|</b>
                <a href="">虾米</a>
                <b>|</b>
                <a href="">阿里云计算</a>
                <b>|</b>
                <a href="">云OS</a>
                <b>|</b>
                <a href="">万网</a>
                <b>|</b>
                <a href="">支付宝</a>
                <b>|</b>
                <a href="">来往</a>
            </p>
        </div>
        <div class="footer-bd box">
            <p>
                <span>
                    <a href="">关于淘宝</a>
                </span>
                <span>
                    <a href="">合作伙伴</a>
                </span>
                <span>
                    <a href="">营销中心</a>
                </span>
                <span>
                    <a href="">廉政举报</a>
                </span>
                <span>
                    <a href="">联系客服</a>
                </span>
                <span>
                    <a href="">开放平台</a>
                </span>
                <span>
                    <a href="">诚征英才</a>
                </span>
                <span>
                    <a href="">联系我们</a>
                </span>
                <span>
                    <a href="">网站地图</a>
                </span>
                <span>
                    <a href="">隐私权政策</a>
                </span>
                <span>
                    <a href="">法律声明</a>
                </span>
                <span>
                    <a href="">知识产权</a>
                </span>
                <b>|</b>
                <em>© 2003-现在 Taobao.com 版权所有</em>
            </p>
            <p>
                <span>
                    <a href="">增值电信业务经营许可证：浙B2-20080224</a>
                </span>
                <b>|</b>
                <span>
                    <a href="">增值电信业务经营许可证（跨地区）： B2-20150210</a>
                </span>
                <b>|</b>
                <span>
                    <a href="">浙网文（2019）1033-086号</a>
                </span>
                <b>|</b>
                <span>
                    <a href="">浙江省网络食品销售第三方平台提供者备案：浙网食A33010001</a>
                </span>
            </p>
            <p>
                <span>互联网药品信息服务资格证书（浙）-经营性-2018-0010</span>
                <b>|</b>
                <span>短消息类服务接入代码使用证书：号【2016】00154-A01</span>
                <b>|</b>
                <span>信息网络传播视听许可证：1109364号</span>
                <b>|</b>
                <span>出版物网络交易平台服务经营备案号：新出发浙备字第002号</span>
            </p>
            <p>
                <span>
                    <a href="">
                        <span class="tb-footer-mod" style="
                  background-position: -861px 0px;
                  width: 20px;
                  height: 20px;
                "></span> 浙公网安备 33010002000078号
                    </a>
                </span>
                <b>|</b>
                <span>
                    <a href="">浙B2-20080224-1</a>
                </span>
                <b>|</b>
                <span>广播电视节目制作经营许可证（浙）字第01012号</span>
                <b>|</b>
                <span>市场名称登记证：工商网市字3301004120号</span>
                <b>|</b>
                <span>医疗器械网络交易服务第三方平台备案：（浙）网械平台备字[2018]第00004号</span>
            </p>
        </div>
        <div class="footer-ft box">
            <a href=""><img src="../img/xia.png" alt="" /></a>
        </div>
    </div>
    <!-- 品质好货 -->
    <div id="adv"
    
    >
        <ul>
            <li><span>品质好坏</span> </li>
            <li><span>猜你喜欢</span> </li>
            <li>反馈</li>
            <li><span>恐暴举报</span></li>
        </ul>
    </div>
    <script>
        var oAdv = document.getElementById("adv");
        var ch = document.documentElement.clientHeight;
        var advH = oAdv.offsetHeight;
        var hei = Math.ceil((ch - advH) / 2);
        oAdv.style.top = hei + "px";
        window.onresize = window.onscroll = function () {
            var ch = document.documentElement.clientHeight;
            var advH = oAdv.offsetHeight;
            var hei = Math.ceil((ch - advH) / 2);
            console.log(hei);
            var scrollTop =
                document.documentElement.scrollTop || document.body.scrollTop;
            oAdv.style.top = hei + scrollTop + "px";
            /* startMove(oAdv, { top: hei + scrollTop }); */
        };


        // 读出 登录 时候 存入本地的数据
        let uid = localStorage.getItem("uid");
        let token = localStorage.getItem("token");
        console.log(uid);

        /*   3-1-3结构  --------   给发布按钮添加点击事件，点击的时候获取 前四个输入框的值  
  
                  发起 添加商品的请求 */

        let sendBtn = document.querySelector("#send button");
        let ipts = document.querySelectorAll("#send input");
        sendBtn.onclick = async function () {
            // BUG参数
            let pname = ipts[0].value;
            let pprice = ipts[1].value;
            let pdesc = ipts[2].value;
            let pimg = ipts[3].value;

            //   uid 全局变量
            let data = { pname, pprice, pdesc, uid, pimg };
            console.log(data);

            let productAddAPI =
                "http://jx.xuzhixiang.top/ap/api/goods/goods-add.php";

            //  **** params 不要拼错
            // 事件和 async 配合
            let r = await axios.get(productAddAPI, { params: data });

            // ***r.data
            console.log(r.data);

            // BUG情况 input
            ipts[0].value = "";
            ipts[1].value = "";
            ipts[2].value = "";
            ipts[3].value = "";

            // 添加完以后调用 商品列表
            loadList();
        };

        //   4-2
        //  BUG商品列表

        async function loadList() {
            let url = "http://jx.xuzhixiang.top/ap/api/allproductlist.php";
            let data = { pagesize: 20, pagenum: 0, uid };
            let res = await axios.get(url, { params: data });
            console.log(res.data);
            let resArr = res.data.data.map(
                (v) => `
            <li>
                <a href="detail.html?pid=${v.pid}">
                <img src="${v.pimg}" alt="">
                <h2>${v.pname}</h2>
                <p>${v.pprice}</p></a>
            </li>
        `
            );
            document.querySelector("#plist").innerHTML = resArr.join("");
        }

        //   页面一开始需要商品列表
        loadList();

        //   5-1
        async function delFN(id) {
            console.log(id);
            // 5-2
            let url = "http://jx.xuzhixiang.top/ap/api/goods/goods-delete.php";
            let data = { pid: id, uid, token };
            let r = await axios.get(url, { params: data });
            console.log(r.data);

            // 删除成功 重新加载列表
            loadList();
        }


        // BUG 6-1 
        function updateFN(pid, pname, pprice, pdesc, pimg) {
            console.log(pid);
            console.log(pname);
            console.log(pimg);
            console.log(pdesc);
            console.log(pprice);

            // 修改div  显示
            let updateDiv = document.querySelector("#updateDiv");
            updateDiv.style.display = "block";
            let ipts = document.querySelectorAll("#updateDiv input");
            // BUG要修改的商品 数据 给 输入框
            ipts[0].value = pname;
            ipts[1].value = pprice;
            ipts[2].value = pdesc;
            ipts[3].value = pimg;

            // BUG给保存按钮 添加点击事件 点击的 发起保存请求
            let saveBtn = document.querySelector("#updateDiv button");
            console.log(saveBtn);
            saveBtn.onclick = async function () {
                let url = "http://jx.xuzhixiang.top/ap/api/goods/goods-update.php";
                let data = {
                    pid,
                    pname: ipts[0].value,
                    pprice: ipts[1].value,
                    pdesc: ipts[2].value,
                    pimg: ipts[3].value,
                };
                console.log(data);

                let r = await axios.get(url, { params: data });
                console.log(r.data);
                // 修改成功-- 重新加载列表
                loadList();
                updateDiv.style.display = "none";
            };
        }
    </script>
</body>
<!-- <button onclick="delFN(${v.pid})">删除</button>
                <button onclick="updateFN('${v.pid}',
                '${v.pname}','${v.pprice}','${v.pdesc}',
                '${v.pimg}')">修改</button> -->

</html>